/**
 * Active contour style properties
 */
export type BaseContourStyle = {
  /** thickness of the outline when segmentation is active */
  outlineWidth?: number;
  /** alpha of outline for active segmentation */
  outlineOpacity?: number;
  /** dash style of the outline when segmentation is active */
  outlineDash?: string;
  /** delta thickness of the active segment index outline (0 means same thickness,
   * 1 means 1px thicker, -1 means 1px thinner) */
  activeSegmentOutlineWidthDelta?: number;
  /** outline visibility */
  renderOutline?: boolean;
  /** render fill */
  renderFill?: boolean;
  /** fill alpha */
  fillAlpha?: number;
};

/**
 * Inactive contour style properties
 */
export type InactiveContourStyle = {
  /** thickness of the outline when segmentation is inactive */
  outlineWidthInactive?: number;
  /** alpha of outline for inactive segmentation */
  outlineOpacityInactive?: number;
  /** dash style of the outline when segmentation is inactive */
  outlineDashInactive?: string;
  /** fillAlphaInactive */
  fillAlphaInactive?: number;
  renderOutlineInactive?: boolean;
  renderFillInactive?: boolean;
};

/**
 * Auto-generated contour style properties
 */
export type AutoGeneratedContourStyle = {
  /** thickness of the outline when segmentation is auto generated */
  outlineWidthAutoGenerated?: number;
  /**
   * Dash style of the outline when segmentation is auto-generated
   */
  outlineDashAutoGenerated?: string;
  /** fillAlphaAutoGenerated */
  fillAlphaAutoGenerated?: number;
};

/**
 * Combined contour style for active, inactive, and auto-generated states
 */
export type ContourStyle = BaseContourStyle &
  InactiveContourStyle &
  AutoGeneratedContourStyle;

/**
 * Contour segmentation data
 */
export type ContourSegmentationData = {
  // Ids of the contourSets that are part of this segmentation
  // in the cache
  geometryIds?: string[];
  // Ids of the annotations that are part of this segmentation
  // grouped by segmentIndex
  annotationUIDsMap?: Map<number, Set<string>>;
};
